package com.kfm.pm;

public class Exec03 {

    public static void main(String[] args) {
        // 编写一个循环，计算并输出从 1 到 100 之间所有偶数的和
        int sum = 0;
        int num = 2;
        while (num <= 100) {
//            if (num % 2 == 0) {
                sum += num;
//            }
            num += 2;
        }
        System.out.println(sum);
    }
}
